<?php namespace nimo\domains\acc\models;

use nimo\common\models\BaseNodeModel;

class MasterCode extends BaseNodeModel {

    protected $table = 'acc_mastercode';
	protected $primaryKey = array('domain', 'id');
    protected $scoped = array('domain');

    public static $rules = array(
        //'domain' => 'required|integer',
        //'id' => 'required|integer',
        'code' => 'required|integer',
        'balance' => 'required|max:10',
        'element' => 'max:160',
        'name' => 'required|max:40',
        'sname' => 'required|max:40',
        'lname' => 'max:160',
        'uname' => 'max:160',
        'spell' => 'max:160',
        'type' => 'max:1',
        'abstract' => 'max:1',
        'cvp_type' => 'max:1',
        'calclute_type' => 'max:1',
        'tax_debt' => 'max:20',
        'tax_credit' => 'max:20',
        'memo' => 'max:1024',
        'node_parent' => 'integer',
        'node_left' => 'integer',
        'node_right' => 'integer',
        'node_depth' => 'integer',
        'node_flag' => 'integer',
    );

    public $incrementing = false;

}
